home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-08-24 | 9.9 KB | 278 lines | [TEXT/ttxt] |
- ######################################################################
- #
- # File: DCC and External Module info from Standard Setup file
- #
- # Copyright: ©1994 by Apple Computer, Inc.
- #
- ######################################################################
-
- ######################################################################
- # Context Check Definitions
- ######################################################################
-
- # Context checks are used to dynamically adapt the sequence of panels
- # presented to match the context of the user.
- #
- # The following context check definitions are used in Macintosh Guide
- # and may also be useful for your guide file. These definitions use
- # external code modules located in the Standard Resources file.
- #
- # Syntax: <Define Context Check> contextCheckName, codeResSpec [, targetApp]
- # [, additionalParam] [, additionalParam]
- # [, ... ]
-
- #============================================
- # From external code module 'SYST' (system)
- #============================================
-
- # Checking if File Sharing is on or off
- #
- # 'SYST'--> system module
- # 'MACS'--> current application's signature
- # LONG:6--> 6 for case isFileSharing in resource file
- # LONG:0--> off; LONG:1--> on
-
- <DCC> "FileSharingOff", 'SYST', 'MACS', LONG:6, LONG:0
- <DCC> "FileSharingOn", 'SYST', 'MACS', LONG:6, LONG:1
-
-
-
- # Checking if Guess Access is off
- #
- # 'SYST'--> system module
- # 'MACS'--> current application's signature
- # LONG:10--> 10 for case isGuessAccess in resource file
- # LONG:0--> fill in words for fill byte
-
- <DCC> "GuestAccessOff", 'SYST', 'MACS', LONG:10, LONG:0
-
-
-
- # Checking the bit depth of the monitor
- #
- # LONG:8--> 8 for case isMonitorBitDepth in resource file
- # LONG--> 4 for greater than the compared value
- # 6 for greater than or equal to the compared value
- # 2 for equal to the compared vale
- # LONG--> compared value, you can specify a value here or in the real context check call
-
- <DCC> "BitDepthGreaterThan", 'SYST', 'MACS', LONG:8, LONG:4, LONG
- <DCC> "BitDepthAtLeast", 'SYST', 'MACS', LONG:8, LONG:6, LONG
- <DCC> "isMonoChrome", 'SYST', 'MACS', LONG:8, LONG:2, LONG:1
-
-
-
- # Checking the number of monitors
- #
- # LONG:11--> 11 for case isNumberMonitors in resource file
- # LONG:4--> 4 for greater than the compared value
- # LONG:1--> compared value
-
- <DCC> "MultipleMonitors", 'SYST', 'MACS', LONG:11, LONG:4, LONG:1
-
-
-
- # Checking if a menu item exists,or has checked mark
- #
- # LONG:1--> 1 for case menuItemExists in resource file
- # 2 for case menuItemMarked in resource file
- # LONG:0--> fill in a long for fill byte
- # LONG:10--> 10 for the string parameter matches the menu name
- # LPSTRING--> the string parameter for comparing with menu name
- # LONG--> 10 for the string parameter matches the menu item name
- # 8 for the string parameter contains anything
- # LPSTRING--> the string parameter for comparing with menu item name
-
- <DCC> "IsMenuExists", 'SYST', 'MACS', LONG:1, LONG:0, LONG:10, LPSTRING, LONG:8, LPSTRING
- <DCC> "IsMenuItemExists", 'SYST', 'MACS', LONG:2, LONG:0, LONG:10, LPSTRING, LONG:10, LPSTRING
- <DCC> "IsMenuItemChecked", 'SYST', 'MACS', LONG:2, LONG:0, LONG:10, LPSTRING, LONG:10, LPSTRING
- <DCC> "CDMenuItemExists", 'SYST', 'aucd', LONG:2, LONG:0, LONG:10, LPSTRING, LONG:10, LPSTRING
-
-
-
- # Checking the processor type
- #
- # LONG:0--> for case gestaltCheck in resource file
- # OSTYOE:'proc'--> the Gestalt selector you want to use, in this case, it's 'proc'
- # LONG--> 5 for less than; 7 for less than or equal to; 3 for not equal to; 2 for equal to
- # SHORT:0--> fill in a short for fill byte
- # LONG--> gestalt compare value
-
- <DCC> "CPUIs68040", 'SYST', 'MACS', LONG:0, OSTYPE:'proc', LONG:5, SHORT:0, LONG:2
- <DCC> "CPU030orGreater", 'SYST', 'MACS', LONG:0, OSTYPE:'proc', LONG:6, SHORT:0, LONG:4
- <DCC> "CPU68kArch", 'SYST', 'MACS', LONG:0, OSTYPE:'proc', LONG:7, SHORT:0, LONG:5
- <DCC> "CPUIs68000", 'SYST', 'MACS', LONG:0, OSTYPE:'proc', LONG:3, SHORT:0, LONG:5
- <DCC> "CPU1bitQD", 'SYST', 'MACS', LONG:0, OSTYPE:'qd ', LONG:2, SHORT:0, LONG:0x000
-
-
-
- # Others
-
- <DCC> "NetworkName", 'SYST', 'MACS', LONG:9, LONG:0, LONG:8
-
-
-
- #============================================
- # From external code module 'File'
- #============================================
-
- # Checking if a named file is in a special type folder, for instances:
- # Extensions, Apple Menu Folder, and so on
- #
- # 'FILE'--> file module
- # 'MACS'--> current application's signature
- # LONG:9--> 9 for case isFileExists in resource file
- # OSTYPE:'extn'--> specify the type of file; if it's an init indicate 'extn';
- # if it's a control panel indicate 'ctrl', and so on.
- # LONG:0--> fill in a long for fill byte
- # LPSTRING--> will be the name of the file you want to check
- # example usage: InControlPanelFolder("Sharing Setup")
-
- <DCC> "InExtensions", 'FILE', 'MACS', LONG:9, OSTYPE:'extn', LONG:0, LPSTRING
- <DCC> "InSystemFolder", 'FILE', 'MACS', LONG:9, OSTYPE:'macs', LONG:0, LPSTRING
- <DCC> "InAppleMenuFolder", 'FILE', 'MACS', LONG:9, OSTYPE:'amnu', LONG:0, LPSTRING
- <DCC> "InControlPanelFolder", 'FILE', 'MACS', LONG:9, OSTYPE:'ctrl', LONG:0, LPSTRING
- <DCC> "AppleShareInstalled", 'FILE', 'MACS', LONG:9, OSTYPE:'extn', LONG:0, LPSTRING:"AppleShare"
- <DCC> "PrintMonitorInstalled", 'FILE', 'MACS', LONG:9, OSTYPE:'extn', LONG:0, LPSTRING:"PrintMonitor"
- <DCC> "GXInstalled", 'FILE', 'MACS', LONG:9, OSTYPE:'extn', LONG:0, LPSTRING:"QuickDraw™ GX"
- <DCC> "RamDiskExists", 'FILE', 'MACS', LONG:9, OSTYPE:'desk', LONG:0, LPSTRING:"Ram Disk"
-
-
- # 'FILE'--> file module
- # 'MACS'--> current application's signature
- # LONG:0--> for case isFrontStartUp in resource file
-
- <DCC> "BootDiskWinActive", 'FILE', 'MACS', LONG:0
-
-
-
- # 'FILE'--> file module
- # 'MACS'--> current application's signature
- # LONG:1--> for case isOpenStartUp in resource file
-
- <DCC> "BootDiskWinOpen", 'FILE', 'MACS', LONG:1
-
-
-
- # Others
-
- <DCC> "ControlPanelWinActive", 'FILE', 'MACS', OSTYPE:'ctrl', LONG:0
- <DCC> "SystemFolderWinActive", 'FILE', 'MACS', OSTYPE:'macs', LONG:0
- <DCC> "AppleMenuWinActive", 'FILE', 'MACS', OSTYPE:'amnu', LONG:0
- <DCC> "ExtensionsWinActive", 'FILE', 'MACS', OSTYPE:'extn', LONG:0
- <DCC> "AppleMenuWinOpen", 'FILE', 'MACS', OSTYPE:'amnu', LONG:1
- <DCC> "ExtensionsWinOpen", 'FILE', 'MACS', OSTYPE:'extn', LONG:1
-
-
-
- #============================================
- # From external code module 'WIND' (window)
- #============================================
-
- # Checking if a named window is open or active
- #
- # 'WIND'--> window module
- # 'MACS'--> current application's signature, if do not specify
- # the signature here, you'll need to specify it in the
- # actual context check call
- # LONG:--> 0 for case isFront in resource file, which means the
- # window is the frontmost (active) one
- # 1 for case isOpen in resource file, which means the window is open
- # 3 for case isShareWindowActive
- # LONG:0--> fill in a long for fill byte
- # LONG:--> 10 for the window name exactly matches the string parameter
- # 11 for window name contains the string parameter
- # 8 for window name contains any string parameter
- # LPSTRING--> will be the name of the window you want to check
- # example usage: OpenWindow('MACS',"Sharing Setup")
-
- <DCC> "OpenWindow", 'WIND', , LONG:1, LONG:0, LONG:10, LPSTRING
- <DCC> "OpenWindowIsInfo", 'WIND','MACS', LONG:1, LONG:0, LONG:11, LPSTRING:"Info"
- <DCC> "ActiveWindow", 'WIND', , LONG:0, LONG:0, LONG:10, LPSTRING
- <DCC> "ActiveWindowIsInfo", 'WIND','MACS', LONG:0, LONG:0, LONG:11, LPSTRING:"Info"
- <DCC> "AnyActiveWindow", 'WIND','MACS', LONG:0, LONG:0, LONG:8
- <DCC> "ActiveWindowIsSharing" , 'WIND', 'MACS', LONG:3
-
-
-
- # Others
-
- <DCC> "FindActive", 'WIND', 'MACS', LONG:3
- <DCC> "FindMoreActive", 'WIND', 'MACS', LONG:4
-
-
-
- #============================================
- # From external code module 'CHSR' (chooser)
- #============================================
-
- # 'CHSR'--> chooser module
- # 'MACS'--> current application's signature
- # LONG:4 --> for case isPrinterType in resource file
- # LONG:0--> fill in a long for fill byte
- # LONG:10--> the string parameter matches the printer name
- # LPSTRING --> the name of the printer you want to check
-
- <DCC> "SelectedPrinter", 'CHSR', 'MACS', LONG:4, LONG:0, LONG:10, LPSTRING
-
-
-
- # LONG:0 --> for case isPrinterDirect in resource file
-
- <DCC> "DirectConnectPrinter", 'CHSR', 'MACS', LONG:0
-
-
-
- # Others
-
- <DCC> "AppleTalkOff", 'CHSR', 'MACS', LONG:5, LONG:0
- <DCC> "NetworkPrinter", 'CHSR', 'MACS', LONG:1, LONG:6, LONG:1
- <DCC> "NetworkHasZones", 'CHSR', 'MACS', LONG:9
- <DCC> "NoSelectedPrinter", 'CHSR', 'MACS', LONG:4, LONG:0, LONG:9, LPSTRING
-
-
-
- #============================================
- # From external code module 'PCSS' (process)
- #============================================
-
- # 'PCSS'--> process module
- # 'MACS'--> pass 'MACS'
- # LONG--> 0 for the specified app is active; 1 for the window(s)
- # of the specified app is active
- # OSTYPE--> pass the application's signature
- # example usage: ActiveAppIs('fndf')
-
- <DCC> "ActiveAppIs",'PCSS','MACS', LONG:0,OSTYPE
- <DCC> "OpenAppIs",'PCSS','MACS', LONG:1,OSTYPE
-
-
-
- #============================================
- # From external code module 'DLOG' (dialog)
- #============================================
-
- <DCC> "ActiveDialog", 'DLOG', 'MACS', LONG:0, LONG
- <DCC> "AnyActiveDialog", 'DLOG', 'aucd', LONG:5
-
-
-
- #============================================
- # From external code module 'DTPr' (desktop printer)
- #============================================
-
- <DCC> "IsThereDTPrinter", 'DTPr',FRONT
-
-
-
- #============================================
- # From external code module 'Pddm' (PDD maker)
- #============================================
-
- <DCC> "IsItPDDMaker", 'Pddm', FRONT, PSTRING
-
-
-
-
-
-